<ui:composition xmlns="http://www.w3.org/1999/xhtml"
		      xmlns:h="http://java.sun.com/jsf/html"
		      xmlns:f="http://java.sun.com/jsf/core"
		      xmlns:ui="http://java.sun.com/jsf/facelets"
		      xmlns:c="http://java.sun.com/jstl/core"
		      xmlns:fmt="http://java.sun.com/jstl/fmt"
		      xmlns:x="http://java.sun.com/jstl/xml"
		      xmlns:fn="http://java.sun.com/jstl/functions"
		      xmlns:a4j="http://richfaces.org/a4j"
		      xmlns:rich="http://richfaces.org/rich"
		      xmlns:gape="http://componentes.gape/component/gape">

	<rich:modalPanel id="panelNewGoalBSC" autosized="true" headerClass="headerModal">
		<f:facet name="controls">
           <h:panelGroup>
               <h:graphicImage value="/files/close.png" styleClass="hidelink" id="hidelinkPanel"/>
               <rich:componentControl for="panelNewGoalBSC" attachTo="hidelinkPanel" operation="hide" event="onclick"/>
           </h:panelGroup>
       	</f:facet>		
		<f:facet name="header">
			<h:outputText value="#{msg.titleInsertNewGoalBSC}" />
		</f:facet>
		<a4j:form>
			<h:panelGrid columns="2" columnClasses="label,field" footerClass="FormLinhaBotoes" headerClass="pathway">
				<h:outputText value="#{msg.perspectiveFilterLabel}" />
				<h:selectOneMenu value="#{bsc.perspectiveGoal}" id="perspectiveGoal">
					<f:selectItems value="#{bsc.listPerspectives}"/>
				</h:selectOneMenu>
				
				<h:outputText value="#{msg.goalLabel}" />
				<h:inputText value="#{bsc.nameGoal}" id="nameGoal"/>
			</h:panelGrid>
			
			<h:panelGrid columns="3" columnClasses="label,field,buttonLink">
				<h:outputText value="#{msg.perspectiveSwotFilterLabel}" />
				<h:selectOneMenu value="#{bsc.perspectiveSwot}">
					<f:selectItems value="#{bsc.listPerspectives}"/>
				</h:selectOneMenu>
				<a4j:commandLink action="#{bsc.filterPerspective}" value="Ok" styleClass="buttonLink" reRender="swotElementTable"/>			
			</h:panelGrid>
				
			<h:panelGrid columns="1" columnClasses="label" footerClass="FormLinhaBotoes" headerClass="pathway">
				<rich:listShuttle sourceValue="#{bsc.listSwotElement}" targetValue="#{bsc.listaSwotElementDerived}" sourceListWidth="140" 
								  targetListWidth="140" var="row" listsHeight="150" showButtonLabels="false" fastOrderControlsVisible="false"
								  orderControlsVisible="false" id="swotElementTable" sourceCaptionLabel="#{msg.existSwotElementTitle}" 
								  targetCaptionLabel="#{msg.usedSwotElementTitle}">
					<rich:column width="20px">
						<h:outputText value="#{bsc.mapaSWOT[row].elementType}" />
					</rich:column>
					<rich:column>
						<h:outputText value="#{bsc.mapaSWOT[row].name}" />								
					</rich:column>
				</rich:listShuttle>
				
				<f:facet name="footer">
					<h:panelGroup>
						<a4j:commandButton action="#{bsc.saveGoal}" value="#{msg.buttonSave}" oncomplete="javascript:Richfaces.hideModalPanel('panelNewGoalBSC');" reRender="treeBSC"/>
						<a4j:commandButton action="#" value="#{msg.buttonCancel}" oncomplete="javascript:Richfaces.hideModalPanel('panelNewGoalBSC');"/>
					</h:panelGroup>
				</f:facet>
			</h:panelGrid>						
		</a4j:form>
	</rich:modalPanel>

</ui:composition>